﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DialogControl.aspx.cs" Inherits="SCS.Web.UI.WebControls.Dialogs.Test.DialogControl" %>
<%@ Register assembly="SCS.Web.UI.WebControls.Dialogs" namespace="SCS.Web.UI.WebControls.Dialogs" tagprefix="cc1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="act" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Dialog Control</h2>

    <p>
        The Dialog Control provides the basic appearance and behavior to all inheriting controls (currently, Templated Dialog, IFrame Dialog, and Flexible Dialog) 
        and is also capable of displaying content on its own dynamically from a Web Service or Web Site.
    </p>

    <p>
        For a live example of the Dialog Control click <asp:LinkButton ID="launchDialogButton" runat="server" Text="here" />. 
        This example shows the Dialog Control which has been configured to display content from a Web Service using the DynamicContextKey, ContentServicePath, and
        ContentServiceMethod properties. To display an HTML fragment from a Web Site page, replace these properties with the ContentUrl property. 
        The full markup for creating this dialog is shown below.
    </p>
    
    <div class="code-box">
    <pre>
    &lt;cc1:Dialog ID=&quot;Dialog1&quot; runat=&quot;server&quot;        
      CssClass=&quot;dialog dialogSample&quot;
      BackgroundCssClass=&quot;modalBackground&quot;         
      Title=&quot;Dialog Control Example&quot;
      Content=&quot;This is a sample dialog&quot; 
      TargetControlId=&quot;launchDialogButton&quot; 
      OnShownScript=&quot;dialog_shown&quot; 
      OnHiddenScript=&quot;dialog_hidden&quot;         
      ShowTitlebarCloseButton=&quot;true&quot;
      ShowCloseButton=&quot;true&quot; 
      ShowOkButton=&quot;true&quot;
      <span class="highlight">DynamicContextKey=&quot;key&quot;
      ContentServicePath=&quot;AjaxService.svc&quot;
      ContentServiceMethod=&quot;GetDialogContent&quot; /&gt;</span>
    </pre>
    <div class="caption">Dialog Control Example Markup</div>
    </div>

    <cc1:Dialog ID="Dialog1" runat="server"        
        CssClass="dialog dialogSample"
        BackgroundCssClass="modalBackground"         
        Title="Dialog Control Example"        
        TargetControlId="launchDialogButton"              
        ShowTitlebarCloseButton="true"
        ShowCloseButton="true" 
        ShowOkButton="true"
        DynamicContextKey="key"
        ContentServicePath="AjaxService.svc"
        ContentServiceMethod="GetDialogContent" />

</asp:Content>
